﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlReportDSForASM.ascx.cs" Inherits="UserControl_ControlReportDSForASM" %>

<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<%@ Register assembly="DevExpress.Web.ASPxTreeList.v9.2.Export" namespace="DevExpress.Web.ASPxTreeList.Export" tagprefix="dxwtl" %>
<%@ Register assembly="DevExpress.Web.ASPxTreeList.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTreeList" tagprefix="dxwtl" %>

<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>


<script type="text/javascript">
    function pageLoad() {



        $("#<%= imgBtnAdd.ClientID %>").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        $("#<%= imgBtnSave.ClientID %>").click(function () {
            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });
            setTimeout($.unblockUI, 5000);
        });
       

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }

    }

</script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="imgBtnSave" />

</Triggers>
    <ContentTemplate>
    
                <div class="direct_container_right_titletop direct_colleft">
                    Báo cáo doanh số cho ASM
                </div>
                
                <!-- Button chuc nang-->
                <div class="direct_menu_report_page direct_colleft">
                    <asp:RadioButton ID="RadioMonthLy" GroupName="radio" Checked="true" Text="Chọn tháng" runat="server" />
                 
                    <asp:DropDownList ID="DropMonthy" runat="server">
                    </asp:DropDownList>
                   <asp:RadioButton ID="RadioQuarter" Checked="false" GroupName="radio" Text="Chọn quý" runat="server" />
                 
                    <asp:DropDownList ID="DropQuater" runat="server">
                    </asp:DropDownList>
                  
                    <asp:ImageButton ID="imgBtnAdd" CausesValidation="false" onclick="imgBtnAdd_Click" ToolTip="Lấy dữ liệu"  ImageUrl="~/Images/Document.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="imgBtnSave" onclick="imgBtnSave_Click" CausesValidation="false" ToolTip="Xuất ra file excel dạng thường" ImageUrl="~/Images/download.png" Width="32px" Height="32px" runat="server" />
                    
                </div>
                <!-- End Button chuc nang-->
                <div class="clear"></div>
                 <hr />

                
                   <table>
                   
                    <tr>
                    <td>
                      <dxwtl:ASPxTreeList ID="ASPxTreeList1" runat="server"
             KeyFieldName="Salesp_Key"
            ParentFieldName="Recommender" AutoGenerateColumns="false">
             <Styles>
               <GroupFooter BackColor="Yellow" Font-Bold="True" ForeColor="Blue">
               </GroupFooter>
               <Footer BackColor="White" Font-Bold="true" ForeColor="Black">
               </Footer>
           </Styles>
          
            <Settings ShowFooter="True" ShowGroupFooter="True" />
            <Columns>
              
                 <dxwtl:TreeListTextColumn Caption="Trình dược viên" FieldName="TDV" 
                    VisibleIndex="0">
                </dxwtl:TreeListTextColumn>
                
                
                 <dxwtl:TreeListTextColumn Caption="Báo cáo cho" FieldName="TuyenTren" 
                    VisibleIndex="1">
                </dxwtl:TreeListTextColumn>
                 <dxwtl:TreeListTextColumn Caption="Doanh số chưa VAT" FieldName="TT" 
                    VisibleIndex="2">
                    <PropertiesTextEdit DisplayFormatString="{0:#,###}">
                    </PropertiesTextEdit>
                </dxwtl:TreeListTextColumn>
                 <dxwtl:TreeListTextColumn Caption="Doanh số đã VAT" FieldName="TTV" 
                    VisibleIndex="3">
                     <PropertiesTextEdit DisplayFormatString="{0:#,###}">
                    </PropertiesTextEdit>
                </dxwtl:TreeListTextColumn>
                
                </Columns>
             </dxwtl:ASPxTreeList>
              <dxwtl:ASPxTreeListExporter TreeListID="ASPxTreeList1" ID="ASPxTreeListExporter1" runat="server">
        </dxwtl:ASPxTreeListExporter>
                    </td>
                    </tr>
                 </table>
                              
             <dxpc:ASPxPopupControl ID="MessageBox" PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="WindowCenter" Font-Bold="true" HeaderText="DRM-S" runat="server" Height="91px" 
        Width="601px">
        <ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True"></dxpc:PopupControlContentControl>
</ContentCollection>
    </dxpc:ASPxPopupControl>
    </ContentTemplate>
</asp:UpdatePanel>